//
//  PeoPleBtnView.m
//  GomeHome
//
//  Created by UNOHACHA on 16/12/7.
//  Copyright © 2016年 iMacOne. All rights reserved.
//

#import "PeoPleBtnView.h"
#import "Header.h"
@implementation PeoPleBtnView
{
    
    UIImageView * _img;
    UILabel * _titL;
    UILabel * _numL;
}
- (instancetype)initWithFrame:(CGRect)frame {
    
    self = [super initWithFrame:frame];
    if (self) {
//        [self initUI];
        
        [self selfViewInit];
    }
    return self;
}

- (void) selfViewInit {
    
    
    UIImageView * mainImg = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0,self.bounds.size.width, self.bounds.size.height)];
    _img = mainImg;
    mainImg.image = IMAGE(@"img_yishushequ2");
    [self addSubview:mainImg];
    
    
    UIView * clareView = [[UIView alloc]initWithFrame:CGRectMake(0,kMaxX(self.bounds)/2, self.bounds.size.width, self.bounds.size.height/2)];
    clareView.userInteractionEnabled = NO;
    clareView.backgroundColor = [UIColor blackColor];
    clareView.alpha = 0.6;
    [self addSubview:clareView];
    
    
    UILabel * starTL = [ReduceCode creatLabelWithFrame:CGRectMake(12, kMaxY(self.bounds)/2+12, kMaxX(self.bounds), 16) title:@"中国画" titleColor:kWhiteColor font:16 textAlignment:NSTextAlignmentLeft];
    starTL.userInteractionEnabled = NO;
    _titL = starTL;
    [self addSubview:starTL];
    
    UILabel * numL = [ReduceCode creatLabelWithFrame:CGRectMake(12, kMaxY(starTL.frame)+12, kMaxX(self.bounds), 16) title:@"378项" titleColor:kWhiteColor font:16 textAlignment:NSTextAlignmentLeft];
     numL.userInteractionEnabled = NO;
    _numL = numL;
    [self addSubview:numL];
 
    
}

- (void)setDic:(NSDictionary *)dic {
    _img.image  = IMAGE(VALUEFORKEY(dic, @"image"));
    _titL.text = VALUEFORKEY(dic, @"titL");
    _numL.text =NSString(@"%@项", VALUEFORKEY(dic, @"numL"));
}

@end
